package com.gsit.orc.util;

import java.net.URL;

import javax.swing.ImageIcon;

public final class ResourceLoader {
	
	final private static ClassLoader loader = ClassLoader.getSystemClassLoader();
	
	
	public static URL getURL(final String fileName){
		URL url = loader.getResource(fileName);
		if(url == null){
		url = loader.getResource("/"+fileName);
		}
		
		return url;
	}
	
	public static ImageIcon getImage(final URL url){
		return new ImageIcon(url);
	}
}
